package com.sh.polymedicine.happysale.service;


import com.sh.polymedicine.happysale.net.entity.CashList;
import com.sh.polymedicine.happysale.net.entity.Definition;
import com.sh.polymedicine.happysale.net.entity.DirtyListResult;
import com.sh.polymedicine.happysale.net.entity.Region;
import com.sh.polymedicine.happysale.net.entity.UserToken;
import com.sh.polymedicine.happysale.result.InfoResult;
import com.sh.polymedicine.happysale.result.ListResult;
import com.sh.polymedicine.happysale.result.PageResult;
import com.sh.polymedicine.happysale.result.SimpleResult;
import com.sh.polymedicine.happysale.result.UserInfoRep;
import com.sh.polymedicine.happysale.result.UserInfoResult;
import com.sh.polymedicine.happysale.result.WalletResult;

import java.util.Map;

import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by zhouyucheng on 2017/9/19.
 */

public interface IHappySaleManager {
    /**
     * 2.1.32	调用地址
     *
     * @param regionCode 区域标识
     * @param tType      终端类型
     * @param map        参数
     * @return Result
     */
    @Headers("Content-Type: application/json")
    @POST("healthyVod/getProgramPlayLink")
    Observable<DirtyListResult<Definition>> getHealthyVodMediaPlayList(@Header("regionCode") String regionCode, @Header("t_type") String tType, @Body Map<String, Object> map);
    /****======================快乐销api=====================**/
    /**
     * 2.1	微信登陆
     *
     * @param map 参数
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("weixin/login")
    Observable<InfoResult<UserToken>> weixinLogin(@Body Map<String, Object> map);

    /**
     * 3.2 短信验证
     *
     * @param userSign 签名
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/sendVerificationCode")
    Observable<SimpleResult> sendVerificationCode(@Header("userSign") String userSign, @Body Map<String, Object> map);

    /**
     * 3.3绑定手机
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/bindMobile")
    Observable<SimpleResult> bindMobile(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.4 保存信息
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/saveMyInfo")
    Observable<SimpleResult> saveMyInfo(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.8用户信息
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/userInfo")
    Observable<UserInfoRep<UserInfoResult>> userInfo(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.9绑定销售经理
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/bindManager")
    Observable<SimpleResult> bindManager(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.10我的钱包信息
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/mine/wallet")
    Observable<WalletResult> mineWallet(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.11 提现历史记录
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/withdraw/history")
    Observable<PageResult<CashList>> cashList(@Header("userSign") String userSign, @Body Map<String, Object> map);

    /**
     * 3.12 提现说明
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/withdraw/description")
    Observable<SimpleResult> withdrawDescription(@Header("userSign") String userSign, @Body Map<String, Object> map);

    /**
     * 3.13  提现
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/withdraw/cash")
    Observable<SimpleResult> cash(@Header("userSign") String userSign, @Body Map<String, Object> map);

    /**
     * 3.14 QQ群
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/discuss/qq")
    Observable<SimpleResult> discussQq(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.15用户反馈
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/feedback")
    Observable<SimpleResult> feedback(@Header("userSign") String userSign, @Body Map<String, Object> map);

    /**
     * 3.16关于我们
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/about")
    Observable<SimpleResult> aboutUs(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.17用户信息
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/user/info")
    Observable<UserInfoResult> userInfo2(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.18 生成二维码
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/user/qrcode")
    Observable<SimpleResult> makePortrait(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.19 修改头像
     *
     * @param userSign
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/user/portrait")
    Observable<SimpleResult> updatePortrait(@Header("userSign") String userSign, @Body Map<String, Object> map);


    /**
     * 3.20 修改昵称
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/user/nickname")
    Observable<SimpleResult> changeNick(@Header("userSign") String userSign, @Body Map<String, Object> map);

    /**
     * 3.21 修改地区
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/user/region")
    Observable<SimpleResult> changeRegion(@Header("userSign") String userSign, @Body Map<String, Object> map);

    /**
     * 3.22  地区列表
     *
     * @param userSign
     * @param map
     * @return
     */
    @Headers("Content-Type: application/json")
    @POST("business/region/all")
    Observable<ListResult<Region>> getRegionList(@Header("userSign") String userSign, @Body Map<String, Object> map);
}
